package com.yiyuwanglu.basecore.dao;

import java.util.List;

import com.mongodb.DBCollection;
import com.mongodb.DBObject;

public interface BaseDao {

	<T> T findById(Class<T> entityClass, String id);

	<T> List<T> findAll(Class<T> entityClass);

	void remove(Object obj);

	void add(Object obj);
	
	void add(Object obj, String collectionName);
	
	DBCollection getCollection(String collectionName);

	void saveOrUpdate(Object obj);
	
	void collectionInsert(DBCollection collection, DBObject data);
}
